--[[ 编码: WMS-13-08 名称: 预收货单-定版前 作者:HAN 日期:2025-1-29 级别:固定 (说明本段代码在项目中不太会变化) 函数: BeforeStateChange 功能: 1)设置 N_B_STATE = 1 更改记录: V5.0 HAN 2023-8-28 error 改成 lua.Error V6.0 HAN 2023/9/6 -- lua.Error/lua.Debug 函数变化 --]] json = require ("json") mobox = require ("OILua_JavelinExt") m3 = require("oi_base_mobox") function BeforeStateChange ( strLuaDEID ) local nRet, strRetInfo local attr_value = {} attr_value[1] = lua.KeyValueObj( "N_B_STATE", 1 ) nRet, strRetInfo = mobox.setCurEditDataObjAttr( strLuaDEID, lua.table2str(attr_value) ) if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "设置【预收货单】信息失败! "..strRetInfo ) end end